From: Florian Müllner Date: Mon, 27 May 2013 19:03:46 +0000 (+0200) Subject: messageTray: Fix lightbox outside the overview X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~4105 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=365cda386c9d3c759904050ebd4653188c3ad197;p=gnome-shell.git messageTray: Fix lightbox outside the overview Commit d0310bd745968 blindly replaced global.overlay_group with Main.layout.overviewGroup, but unlike the former, the latter is hidden while the overview is not active, which makes it unsuitable for the message tray's light box. In fact, with the removal of global.overlay_group, there is no longer a container which may be used both inside and outside the overview, so we can either recreate the lightbox each time we show/hide the overview, or use different lightboxes altogether; this opts for the latter. https://bugzilla.gnome.org/show_bug.cgi?id=701097 --- diff --git a/js/ui/messageTray.js b/js/ui/messageTray.js index efba34b08..c0569247a 100644 --- a/js/ui/messageTray.js +++ b/js/ui/messageTray.js @@ -1658,12 +1658,16 @@ const MessageTray = new Lang.Class({ this.clearableCount = 0; - this._lightbox = new Lightbox.Lightbox(Main.layoutManager.overviewGroup, - { inhibitEvents: true, - fadeInTime: ANIMATION_TIME, - fadeOutTime: ANIMATION_TIME, - fadeFactor: 0.2 - }); + this._lightboxes = []; + let lightboxContainers = [global.window_group, + Main.layoutManager.overviewGroup]; + for (let i = 0; i < lightboxContainers.length; i++) + this._lightboxes.push(new Lightbox.Lightbox(lightboxContainers[i], + { inhibitEvents: true, + fadeInTime: ANIMATION_TIME, + fadeOutTime: ANIMATION_TIME, + fadeFactor: 0.2 + })); Main.layoutManager.trayBox.add_actor(this.actor); Main.layoutManager.trayBox.add_actor(this._notificationWidget); @@ -2325,7 +2329,8 @@ const MessageTray = new Lang.Class({ transition: 'easeOutQuad' }); - this._lightbox.show(); + for (let i = 0; i < this._lightboxes.length; i++) + this._lightboxes[i].show(); return true; }, @@ -2380,7 +2385,8 @@ const MessageTray = new Lang.Class({ // which would happen if GrabHelper ungrabbed for us. // This is a no-op in that case. this._grabHelper.ungrab({ actor: this.actor }); - this._lightbox.hide(); + for (let i = 0; i < this._lightboxes.length; i++) + this._lightboxes[i].hide(); }, _hideDesktopClone: function() {